package demo7;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Demo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("demo7");
        System.out.println("Spring容器初始化完毕");
        Person person = context.getBean(Person.class);
        System.out.println("4.调用Person对象的方法，进行使用....");
        person.play();

        context.close();

        System.out.println("容器关闭");
    }
}
